﻿using System.Drawing;
using System;

namespace SimpleDayView
{
    internal static class Interpolator
    {
        public static Color InterpolateColors(Color color1, Color color2, float percentage)
        {
            int num1 = color1.R;
            int num2 = color1.G;
            int num3 = color1.B;
            int num4 = color2.R;
            int num5 = color2.G;
            int num6 = color2.B;
            byte num7 = Convert.ToByte((((num1) + ((num4 - num1)) * percentage)));
            byte num8 = Convert.ToByte((((num2) + ((num5 - num2)) * percentage)));
            byte num9 = Convert.ToByte((((num3) + ((num6 - num3)) * percentage)));
            return Color.FromArgb(num7, num8, num9);
        }
    }
}
